DRIVER AND FUNCTION SUBROUTINES

The DRIVER controls the input and output function and the selection of the model. The input consists of a program card which specifies the model to be used and the output times and either a G-card or T-card element set.

The DRIVER reads and converts the input elements to units of radians and minutes. These are communicated to the prediction model through the COMMON E1. Values of the physical and mathematical constants are set and communicated through the COMMONs C1 and C2, respectively.

The program card indicates the mathematical model to be used and the start and stop time of prediction as well as the increment of time for output. These times are in minutes since epoch.

In the interest of efficiency the DRIVER sets a flag (IFLAG) the first time the model is called. This flag tells the model to calculate all initialized (time independent) quantities. After initialization, the model subroutine turns off the flag so that all subsequent calls only access the time dependent part of the model. This mode continues until another input case is encountered.

The DRIVER takes the output from the mathematical model (communicated through the COMMON E1) and converts it to units of kilometers and seconds for printout.

The function subroutine ACTAN is passed the values of sine and cosine in that order and it returns the angle in radians within the range of 0 to 2π. The function subroutine FMOD2P is passed an angle in radians and returns the angle in radians within the range of 0 to 2π. The function subroutine THETAG is passed the epoch time exactly as it appears on the input element cards.1 The routine converts this time to days since 1950 Jan 0.0 UTC, stores this in the COMMON E1, and returns the right ascension of Greenwich at epoch (in radians).

FORTRAN IV computer code listings of the routines DRIVER, ACTAN, FMOD2P, and THETAG are given below. #center4789# #center4790# #center4791# #center4792#